package com.beans;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

@Controller
public class User4 {
    @Bean(name = {"userInfo", "u1"})
    public User getUser(){
        User user = new User();
        user.sayHi("zjk");
        return user;
    }
}
